﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RedfieldWeather.Controls
{
	public partial class Barometer : System.Web.UI.UserControl
	{
		public void SetCurrentConditions(RFW.Weather.CurrentConditions cc)
		{
			lblRaw.Text = string.Format("{0:N2} in", cc.Barometer.Raw);
			lblRate.Text = string.Format("{0:N3} in/hr", cc.Barometer.RawRate);

			if (cc.Barometer.RawRate > 0)
				lblChange.Text = "&uarr;";
			else if (cc.Barometer.RawRate == 0)
				lblChange.Text = "&nbsp;";
			else
				lblChange.Text = "&darr;";
		}
	}
}